Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append sqlite suffix to name on info output #2307

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Sep 6, 2024

Closes #2298

PR makes it so that the database name informational output will contain the suffix for sqlite connections, e.g.:

 $ bin/phinx migrate
Phinx by CakePHP - https://phinx.org. 0.x-dev

using config file phinx.yaml
using config parser yml
using migration paths
 - /home/mpeveler/github/phinx/db/migrations
using seed paths
 - /home/mpeveler/github/phinx/db/seeds
warning no environment specified, defaulting to: testing
using adapter sqlite
using database phinx_test.sqlite3
ordering by creation time

 == 20240906173954 Foo: migrating
 == 20240906173954 Foo: migrated 0.0158s

All Done. Took 0.0184s

This should make the info more informational on what's happening. Working on this, I am definitely leaning increasingly towards deprecating/removing the suffix option altogether and require that users only use the name option instead, which is similar to how most ORMs handle it.

@MasterOdin MasterOdin merged commit a093a96 into 0.x Sep 6, 2024
12 checks passed
@MasterOdin MasterOdin deleted the fix-sqlite-name branch September 6, 2024 23:31
@zeleznypa
Copy link

Unfortunately it cause the #2311

@InvisibleSmiley
Copy link

FTR one used to be able to create a SqliteAdapter with empty options (e.g. for tests), but since this change at least a the "name" option needs to be provided. I guess in the context of normal invocation that should always be set (cf. Phinx config environment section).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include suffix in "using database" for sqlite
3 participants